<?php

/**
 * oRs
 *
 * @version 3.0
 * @copyright 2009 Ron Planken
 * @class: debug
 * @description: Should handle all debug logging to files/database/email and error catching.
 */

class debug {

	function log_action($reason,$ext = "html"){
		if(!is_dir("logs")):
		mkdir("logs","0493");
		endif;
		$fp = fopen("logs/".date("d-m-y").".".$ext, "a+");
		fwrite($fp, "<strong>Date: </strong>". date("H:i:s"). "<br/><strong>User: </strong>" . $_SESSION['uid'] .  "<br/><strong>Query:</strong>". $reason. "<br/><hr>");
	}

}
?>